package com.lsa.letcode.the91.decodeWays;

import static org.junit.Assert.*;

import org.junit.Test;

public class DecodeWaysTest {
	@Test
	public void testName() throws Exception {
		test(2, "1022");
		test(0, "0");
		test(0, "01");
		test(2, "12");
		test(3, "123");
		test(2, "134");
		test(10, "261123");
		test(589824, "4757562545844617494555774581341211511296816786586787755257741178599337186486723247528324612117156948");
		test(3981312, "9371597631128776948387197132267188677349946742344217846154932859125134924241649584251978418763151253");
	}

	private void test(int expected, String str) {
		Solution s = new Solution();
		assertEquals(expected, s.numDecodings(str));
	}
}
